import { http } from '@/utils/axios';

export function pageDictValue(data: Dict.QueryDictValueReq) {
  return http.request({
    url: '/v1/basic/dict-value/page',
    method: 'POST',
    data,
  });
}

export function listDictByKey(data: Dict.QueryDictValueReq) {
  return http.request<Dict.SysDictValue[]>({
    url: '/v1/basic/dict-value/list-dict-key',
    method: 'POST',
    data,
  });
}

export function create(data: Dict.SysDictValue) {
  return http.request({
    url: '/v1/basic/dict-value/create',
    method: 'POST',
    data,
  });
}

export function modify(data: Dict.SysDictValue) {
  return http.request({
    url: '/v1/basic/dict-value/modify',
    method: 'POST',
    data,
  });
}

export function removeDictValue(id: string) {
  return http.request({
    url: `/v1/basic/dict-value/${id}`,
    method: 'DELETE',
  });
}
